<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="jQuery/jquery-2.1.1.min.js"></script>
<script src="jQuery/jquery-ui.min.js"></script>
<script type="text/javascript">
	$(function() {
		$("#button1").click(function() {
			$.ajax({
				type : "POST",
				url : "Ajax-sum",
				dateType : "html",
				data : {
					'param1' : $("#param1").val(),
					'param2' : $("#param2").val()
				},
				success : function(returnedData) {
					$("#result").val(returnedData);
				}

			})

		})
	});
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<input type="text" id="param1">+
	<input type="text" id="param2">=
	<input type="text" id="result">
	<input type="button" value="get content from server" id="button1">
</body>
</html>